package com.example.sqlitetest;

import com.example.sqlitetest.repository.ExpressOrderRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.orm.hibernate5.LocalSessionFactoryBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;
import java.util.Map;

@RestController
@SpringBootApplication
public class SqliteTestApplication {
    @Autowired
    Environment env;
    @Autowired
    ExpressOrderRepository expressOrderRepository;

    public static void main(String[] args) {
        SpringApplication.run(SqliteTestApplication.class, args);
    }

    @GetMapping("/")
    public Object test1(Pageable pageable) {
        return expressOrderRepository.findAll(pageable);
    }


}
